package com.xiaofengstu.mcams.web.mapper;

import com.xiaofengstu.mcams.web.entity.Workflow;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author fengzeng
 * @since 2022-05-07
 */
@Mapper
public interface WorkflowMapper extends BaseMapper<Workflow> {

  @Select("select * from workflow w join t_user tu on tu.user_id = w.create_by \n" +
      "join t_dept td on td.dept_id  = tu.dept_id \n" +
      "join t_asset ta on ta.asset_id  = w.asset_id " +
      "where ta.status = #{workflowStatus}")
  List<Workflow> defineList(@Param("workflowStatus") String workflowStatus);
}
